<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        <button @click="send()"></button>
    </div>

</body>

</html>
<script>
    new Vue({
        el: '#app',
        data() {
            return {}
        },
        //生命周期函数
        beforeCreate() {
            console.log('创建之前');
        },
        created() {
            console.log('创建之后');
        },
        beforeMount() {
            console.log('挂载之前');
        },
        mounted() {
            //*
            console.log('挂载完毕');
            // this.getAll();
        },
        beforeUpdate() {
            console.log('修改data之前');
        },
        updated() {
            console.log('修改之后');
        },
        beforeDestroy() {
            console.log('销毁之前 交代一下');
        },
        destroyed() {
            
            console.log('销毁正式离去....');
        },
        methods: {
            getAll() { }
        }
    })
</script>